﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace bankproject
{
    public partial class Form1 : Form
    {
        
        public Form1()
        {
            
            InitializeComponent();
          
        }

        private void button2_Click(object sender, EventArgs e)
        {
           
            Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            bool succes=false;

            Model mod = new Model();
            succes=mod.login(cardnumber.Text,pincode.Text);
            if (succes == true)
            {
              //  MessageBox.Show("belépve");
                button3.Visible = true;
                button4.Visible = true;

            }
            else
            {
                MessageBox.Show("acces denied");
            }

        }

        private void button3_Click(object sender, EventArgs e)
        {
            TakeCash takecash = new TakeCash();
            takecash.Show();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            GetBalance getbalance = new GetBalance();
            getbalance.Show();
           
        }
    }
}
